﻿@model Inscriptionem.Areas.Inscriptionem.Models.Views.LanguageCollectionViewModel

@{
    ViewBag.Title = "Inscriptionem » Languages";
    Layout = "../Shared/Layout.cshtml";

    ViewBag.CurrentPage = "Languages";
}

<div class="outer" id="contentwrap">
    @{Html.RenderPartial("NavigationMenu");}
    <div class="postcont">
		<div id="content">
            <div class="post type-post status-publish format-standard hentry">
                <h2 class="title">Languages</h2>
                <div class="postdate-single error-message"></div>
                <table width="100%">
                    <thead>
                        <tr class="postdate">
                            <td>Order</td>
                            <td>Language</td>
                            <td>Language Name</td>
                            <td>Is Default</td>
                            <td style="width: 60px;"></td>
                            <td style="width: 60px;"></td>
                        </tr>
                    </thead>
                    <tbody>
                    @foreach(var language in Model.Languages)
                    {
                    <text>
                    <tr>
                        <td>@language.Order</td>
                        <td>@language.Name</td>
                        <td>@language.LocalizedName</td>
                        <td><input type="checkbox" @(language.IsDefault ? "checked" : string.Empty) disabled="disabled" /></td>
                        <td>
                            <form method="post" action="/Inscriptionem/Language/Edit">
                                <input type="hidden" name="ID" value="@language.ID" />
                                <input type="submit" value="Edit" />
                            </form>
                        </td>
                        <td>
                            <form method="post" action="/Inscriptionem/Language/Delete">
                                <input type="hidden" name="ID" value="@language.ID" />
                                <input type="submit" value="Delete" />
                            </form>
                        </td>
                    </tr>
                    </text>
                    }
                    <tr>
                        <td><a href="/Inscriptionem/Language/Order">Change</a></td>
                    </tr>
                    </tbody>
                </table>
                <hr />
                <form method="post" action="/Inscriptionem/Language/Add">
                    <div class="postdate">Add Language</div>
				    <div class="entry">
                        <p>Order <input type="text" name="Order" value="" /></p>
                        <p>Language <input type="text" name="Name" value="" /></p>
                        <p>Language Name <input type="text" name="LocalizedName" value="" /></p>
                        <p>Default <input type="checkbox" name="IsDefault" /></p>
	                </div>

                    <input type="reset" value="Reset" />&nbsp;|&nbsp;<input type="submit" value="Add" />
                </form>
			</div>
        </div>
	</div>	
</div>
